﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Black.Jack
{

    public class Hand
    {
        int card;
        int[] cards = new int[52];

        public int GetCount()
        {
            return card;
        }

        public int GetTotal()
        {
            int total = 0;

            for (int i = 0; i < 5; i++)
                total += cards[i];

            return total;
        }

        public void ShowHand(bool hideFirstCard)
	    {
		    int i = hideFirstCard ? 1 : 0;

            if (hideFirstCard)
                Console.Out.Write("H ");

		    for( ; i < 5; i++ )
		    {
				Console.Out.Write( cards[i] + " " );
		    }

            Console.Out.WriteLine();
	    }

        public void AddCard(int newCard)
        {
            if (card < 5)
                cards[card++] = newCard;
        }
    }
}
